Image difference detection device, method for detecting image difference, and computer program

ABSTRACT

An image difference detection device includes a detection unit configured to detect presence or absence of a difference between a first region within a first image and a second region corresponding to the first region within a second image on the basis of one or both of a code amount of each of encoded blocks in first and second encoded data obtained by encoding the first image and the second image and an index value obtained from encoding information of each of the encoded blocks.

TECHNICAL FIELD

The present invention relates to technology for detecting a differencebetween two or more images.

This application is a 371 U.S. National Stage of InternationalApplication No. PCT/JP2016/087198, filed Dec. 14, 2016, which claimspriority to Japanese Patent Application No. 2015-244556 filed on Dec.15, 2015, Japanese Patent Application No. 2016-131155 filed on Jun. 30,2016, and Japanese Patent Application No. 2016-131162 filed on Jun. 30,2016, the contents of which are incorporated herein by reference.

BACKGROUND ART

In recent years, attention has been paid to technology for detecting adifference between two or more images such as event detection from amoving image for monitoring, abnormality detection in medical use, andchange detection from an aerial or satellite image. Techniques fordetecting the presence or absence of an event from a moving image havebeen proposed (for example, see Patent Document 1). In such techniques,whether or not there is a change in a target image is detected on thebasis of a ratio between a complexity index value of a target image(calculated from a quantization step width and a generated code amount)and a complexity index value of an immediately previous image. That is,it is possible to detect a change in images in a time axis direction andthe above-described technique can be applied to event detection from amonitoring moving image.

CITATION LIST Patent Literature

[Patent Document 1]

Japanese Unexamined Patent Application, First Publication No. 2014-86913

SUMMARY OF INVENTION Technical Problem

However, it is difficult to detect a region where a change has occurredwithin the image and it is difficult for the above-described techniqueto be applied to abnormality detection in the field of medicine orchange detection from an aerial/satellite image. In particular, there isa problem in that it is difficult to perform abnormality detection inthe field of medicine or change detection from an aerial/satellite imagemerely by segmenting the region (dividing the image into blocks andusing the complexity index value of each block) in a video analysisdevice described in Patent Document 1. This is because only a change ina time axis direction is taken into account and no spatial change istaken into account. Thus, the characteristics of the entire image (e.g.,brightness, a sense of detail, and the like) are slightly different andthe complexity index value of each block is also different. There is aproblem in that it is determined that a change is uniform in all blocksonly by checking a ratio between a complexity index value of the sameblock spatially within an immediately previous image in a time axisdirection and a complexity index value of a target block within a targetimage.

In view of the above-described circumstances, an objective of thepresent invention is to provide technology for detecting a differencebetween two or more images at a higher speed.

Solution to Problem

According to a first aspect of the present invention, an imagedifference detection device includes a detection unit configured todetect presence or absence of a difference between a first region withina first image and a second region corresponding to the first regionwithin a second image on the basis of one or both of a code amount ofeach of encoded blocks in first and second encoded data obtained byencoding the first image and the second image and an index valueobtained from encoding information of each of the encoded blocks.

According to a second aspect of the present invention, in the imagedifference detection device according to the first aspect, a variablelength code is used in encoding used when the first and second encodeddata is obtained.

According to a third aspect of the present invention, the imagedifference detection device according to the first or second aspectfurther includes an encoding information acquisition unit configured toacquire the encoding information of each of the encoded blocks from thefirst and second encoded data, wherein the detection unit is furtherconfigured to determine the presence or absence of the differencebetween the first region and the second region on the basis of the indexvalue obtained from the encoding information acquired by the encodinginformation acquisition unit.

According to a fourth aspect of the present invention, the imagedifference detection device according to the first or second aspectfurther includes an input unit configured to input information foridentifying each of the first and second regions between which thepresence or absence of the difference is detected in the first andsecond images; and a region identification unit configured to identifyeach of the encoded blocks corresponding to the first and second regionsidentified on the basis of the information input by the input unit,wherein the detection unit is further configured to detect the presenceor absence of the difference between the first and second regionsidentified on the basis of one or both of the code amount of the encodedblock identified by the region identification unit and the index valueobtained from the encoding information.

According to a fifth aspect of the present invention, in the imagedifference detection device according to the fourth aspect, the inputunit is further configured to input position information indicating aposition where there is a subject serving as a detection target of thedifference in the first and second images as information for identifyingthe first and second regions.

According to a sixth aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes a classification unit configured to classify the encoded blocksinto a plurality of categories on the basis of the encoding informationobtained when a plurality of encoded blocks obtained by dividing each ofthe first and second images are encoded, wherein the detection unit isfurther configured to determine a threshold value for use in adetermination of the presence or absence of the difference between thefirst region and the second region on the basis of a classificationresult of the classification unit, and wherein the detection unit isfurther configured to determine the presence or absence of thedifference between the first region and the second region on the basisof one or both of the code amount and the index value and the determinedthreshold value.

According to a seventh aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes a classification unit configured to classify the encoded blocksinto a plurality of categories on the basis of the encoding informationobtained when a plurality of encoded blocks obtained by dividing each ofthe first and second images are encoded, wherein the detection unit isfurther configured to determine a determination condition for use in thedetermination of the presence or absence of the difference between thefirst region and the second region on the basis of a classificationresult of the classification unit, and wherein the detection unit isfurther configured to determine the presence or absence of thedifference between the first region and the second region on the basisof one or both of the code amount and the index value and the determineddetermination condition.

According to an eighth aspect of the present invention, in the imagedifference detection device according to the sixth or seventh aspect,the classification unit is further configured to classify the encodedblocks into the plurality of categories on the basis of a degree ofcomplexity of an image obtained from the encoding information.

According to a ninth aspect of the present invention, in the imagedifference detection device according to the sixth or seventh aspect,the plurality of categories include a flat region and a complex region,and the classification unit is further configured to classify each ofthe encoded blocks as the flat region or the complex region on the basisof the degree of complexity of an image obtained from the encodinginformation.

According to a tenth aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes a type input unit configured to input type informationindicating a characteristic of the difference detected between the firstand second images; a parameter determination unit configured todetermine a quantization matrix on the basis of the type information;and an encoding unit configured to divide each of the first and secondimages into a plurality of encoded blocks and encode each of theplurality of encoded blocks on the basis of the quantization matrix togenerate the first and second encoded data.

According to an eleventh aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes a starting point input unit configured to input a plurality ofstarting points at which encoding starts in the first and second images;and an encoding unit configured to divide each of the first and secondimages into a plurality of encoded blocks on the basis of the startingpoints and encode the encoded blocks to generate the first and secondencoded data for each starting point, wherein the detection unit isfurther configured to determine the presence or absence of thedifference between the first region and the second region on the basisof the index value obtained from the encoding information calculated foreach encoded block in a process of encoding each of the first and secondimages.

According to a twelfth aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes a correction unit configured to correct the index value on thebasis of a difference between a position of the encoded block in thefirst image and a position of the encoded block in the second image whenthe first and second images are encoded, wherein the detection unit isfurther configured to determine the presence or absence of thedifference between the first region and the second region on the basisof the index value corrected by the correction unit.

According to a thirteenth aspect of the present invention, in the imagedifference detection device according to the twelfth aspect, thecorrection unit is further configured to select at least one coefficientfrom a plurality of predetermined coefficients on the basis of thedifference and correct the index value by using the selectedcoefficient.

According to a fourteenth aspect of the present invention, the imagedifference detection device according to the first aspect furtherincludes an adjustment unit configured to adjust a code amount of eachof the encoded blocks in the first encoded data or the second encodeddata on the basis of a ratio between total code amounts of the first andsecond encoded data, wherein the detection unit is further configured todetermine the presence or absence of the difference between the firstregion and the second region on the basis of the code amount adjusted bythe adjustment unit.

According to a fifteenth aspect of the present invention, in the imagedifference detection device according to the fourteenth aspect, theadjustment unit is further configured to determine that the first imageand the second image are entirely different images or that detection ofthe difference therebetween is impossible if the ratio between the totalcode amounts of the first and second encoded data exceeds apredetermined value.

According to a sixteenth aspect of the present invention, an imagedifference detection method includes a detection step of detectingpresence or absence of a difference between a first region within afirst image and a second region corresponding to the first region withina second image on the basis of one or both of a code amount of each ofencoded blocks in first and second encoded data obtained by encoding thefirst image and the second image and an index value obtained fromencoding information of each of the encoded blocks.

According to a seventeenth aspect of the present invention, a computerprogram is configured to cause a computer to function as: a detectionunit configured to detect presence or absence of a difference between afirst region within a first image and a second region corresponding tothe first region within a second image on the basis of one or both of acode amount of each of encoded blocks in first and second encoded dataobtained by encoding the first image and the second image and an indexvalue obtained from encoding information of each of the encoded blocks.

Advantageous Effects of Invention

According to the present invention, it is possible to detect adifference between two or more images at a higher speed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing a configuration of an image differencedetection device according to a first embodiment of the presentinvention.

FIG. 2 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 1.

FIG. 3 is a block diagram showing a configuration of an image differencedetection device according to a second embodiment of the presentinvention.

FIG. 4 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 3.

FIG. 5 is a block diagram showing a configuration of an image differencedetection device according to a third embodiment of the presentinvention.

FIG. 6 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 5.

FIG. 7 is a block diagram showing a configuration of an image differencedetection device according to a fourth embodiment of the presentinvention.

FIG. 8 is a block diagram showing a configuration of an image differencedetection device according to a fifth embodiment of the presentinvention.

FIG. 9 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 8.

FIG. 10 is a block diagram showing a configuration of an imagedifference detection device according to a sixth embodiment of thepresent invention.

FIG. 11 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 10.

FIG. 12 is a block diagram showing a configuration of an imagedifference detection device according to a seventh embodiment of thepresent invention.

FIG. 13 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 12.

FIG. 14 is a block diagram showing a configuration of an imagedifference detection device according to an eighth embodiment of thepresent invention.

FIG. 15 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 14.

FIG. 16 is a flowchart showing an example of a process of determiningwhether or not a region is a changed region in the operation processshown in FIG. 14.

FIG. 17 is a flowchart showing another example of a process ofdetermining whether or not a region is a changed region in the operationprocess shown in FIG. 14.

FIG. 18 is a block diagram showing a configuration of an imagedifference detection device according to a ninth embodiment of thepresent invention.

FIG. 19 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 18.

FIG. 20 is a block diagram showing a configuration of an imagedifference detection device according to a tenth embodiment of thepresent invention.

FIG. 21 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 20.

FIG. 22 is a block diagram showing a configuration of an imagedifference detection device according to an eleventh embodiment of thepresent invention.

FIG. 23 is a flowchart showing a processing operation of the imagedifference detection device shown in FIG. 22.

FIG. 24 is a flowchart showing a processing operation of obtaining anindex value from encoded data encoded by HEVC or H.264 in the processingoperation shown in FIG. 23.

FIG. 25 is a flowchart showing a processing operation of obtaining anindex value from encoded data encoded by JPEG in the processingoperation shown in FIG. 23.

FIG. 26 is a flowchart showing a process of correcting a complexityindex value in a common region in the processing operation shown in FIG.23.

FIG. 27 is an explanatory diagram of a process of correcting acomplexity index value in a common region.

DESCRIPTION OF EMBODIMENTS

Hereinafter, image difference detection devices according to embodimentsof the present invention will be described with reference to thedrawings. The image difference detection devices according to theembodiments appropriately detect a change (or a difference) in eachregion within an image from two or more images and can also be appliedto change detection from abnormality detection in the field of medicineand change detection from an aerial/satellite image.

<First Embodiment>

An image difference detection device according to a first embodimentwill be described. Hereinafter, change point detection between satelliteimages using moving image encoding will be described as an example. FIG.1 is a block diagram showing a configuration of an image differencedetection device 10 according to the first embodiment. FIG. 2 is aflowchart showing a processing operation of the image differencedetection device 10 shown in FIG. 1. The image difference detectiondevice 10 shown in FIG. 1 includes a computer device. The imagedifference detection device 10 includes a change detection target sizeinput unit 1, an encoding parameter determination unit 2, an encodingunit 3, a change detection unit 4, and an image input unit 5. Here, anoperation in which the image difference detection device 10 detects aregion having a change in an image B with respect to an image A (aspatial region having a difference between two images) will bedescribed. Also, hereinafter, a case in which an encoding scheme used bythe image difference detection device 10 is HEVC and an encodingparameter includes an encoding size will be described as an example.

The processing operation of the image difference detection device 10shown in FIG. 1 will be described. The change detection target sizeinput unit 1 inputs a size (e.g., a pixel size) of a change targetdesired to be detected from an outside and outputs the size of thechange target to the encoding parameter determination unit 2 (step S1).Although the size of the change target may be a pixel size as anexample, the present invention is not limited to the pixel size as longas the size is an index for designating a range on the image.Subsequently, the encoding parameter determination unit 2 determines anencoding parameter, for example, each encoding size, in accordance witha size of the input change target (step S2). Each encoding size is asize of a macro block (MB) of MPEG or the like, a coding unit (CU), aprediction unit (PU), or a transform unit (TU) of HEVC, or the like.Here, a largest CU (LCU) size will be described as an example of theencoding size. The encoding parameter determination unit 2 outputs thedetermined LCU size to the encoding unit 3.

On the other hand, the image input unit 5 inputs at least two images, animage A (a first image) and an image B (a second image), to be subjectedto change detection from an outside (step S3). Although thephotographing dates and times of the images A and B are different,spatial regions of the photographing ranges of the images A and B arethe same. The image A is an image captured at an earlier date and timethan the image B. The images A and B are output to the encoding unit 3.The encoding unit 3 performs HEVC intra-encoding of the image A and theimage B with the input LCU size (step S4).

A process of detecting whether or not there is a change (a difference)in each LCU in the change detection unit 4 shown in FIG. 1 will bedescribed. First, the change detection unit 4 compares a code amount ofthe target LCU in the detection target image with a code amount of anLCU adjacent to the target LCU in four directions (up, down, right andleft), and the change detection unit 4 determines which of the followingconditions X ((1) to (8)) is satisfied (step S5).max(R(N−1)/ R(N), R(N)/ R(N−1))>R_Th1  (1)max(R(N+1)/ R(N), R(N)/ R(N+1))>R_Th1  (2)max(R(N−x)/ R(N), R(N)/ R(N−x))>R_Th1  (3)max(R(N+x)/ R(N), R(N)/ R(N+x))>R_Th1  (4)min(R(N−1)/ R(N), R(N)/ R(N−1))<R_Th2  (5)min(R(N+1)/ R(N), R(N)/ R(N+1))<R_Th2  (6)min(R(N−x)/ R(N), R(N)/ R(N−x))<R_Th2  (7)min(R(N+x)/ R(N), R(N)/ R(N+x))<R_Th2  (8)

Here, R denotes a code amount of an LCU. max(R(N−1), R(N)) denotes thelarger one of R(N−1) and R(N). min(R(N−1), R(N)) denotes the smaller oneof R(N−1) and R(N). R_Th1 is a threshold value that satisfies R_Th1>1.R_Th2 is a threshold value that satisfies 0<R_Th2≤1. Also, N denotes anN-th LCU in the image B, and the N-th LCU is a target LCU. N−1 denotesan LCU adjacent to the left of the target LCU. N+1 denotes an LCUadjacent to the right of the target LCU. N−x denotes an LCU adjacentabove the target LCU. N+x denotes an LCU adjacent under the target LCU.In this case, a calculation target of a ratio of code amounts is theimage B.

If the target LCU does not satisfy all of the conditions X (code amountsof adjacent LCUs above, below, and to the right and left are notsignificantly different from the code amount of the target LCU) (NO instep S5), the change detection unit 4 determines that there is no changein the target LCU and stores a result of detecting the target LCU withinthe change detection unit 4 (step S7).

On the other hand, if any one of the conditions X is satisfied (YES instep S5), the change detection unit 4 compares a code amount of the LCUin the image A spatially located at the same position as the target LCUin the image B with a code amount of the target LCU. Then, on the basisof the code amount of the LCU of the image A spatially located at thesame spatial position as the target LCU of the image B and the codeamount of the target LCU of the image B, the change detection unit 4confirms whether either of the following conditions Y ((9) and (10)) issatisfied (step S6).max(R_A(N)/ R_B(N), R_B(N)/ R_A(N))>R_Th3  (9)min(R_A(N)/ R_B(N), R_B(N)/ R_A(N))<R_Th4  (10)

Here, R_B denotes a code amount of the target LCU, and R_A denotes acode amount of the LCU in the image A spatially at the same position asthe target LCU. R_Th3 is a threshold value that satisfies R_Th3>1, andR_Th4 is a threshold value that satisfies 0<R_Th4≤1.

If the target LCU does not satisfy all the conditions Y (the code amountof the target LCU is not significantly different from the code amount ofthe LCU in the image A spatially located at the same position as thetarget LCU) (NO in step S6), the change detection unit 4 determines thatthere is no change in the target LCU and stores the result of detectingthe target LCU within the change detection unit 4 (step S7).

On the other hand, if any one of the conditions Y is satisfied (YES instep S6), the change detection unit 4 determines that there is a changein the target LCU and similarly stores the detection result (step S7).Then, at a point in time when the above-described processing (steps S5,S6, and S7) is iterated and completed for all the LCUs in the image B,the change detection unit 4 outputs a result of detecting a change inthe target image (here, the image B) and the process is completed (stepS8). If input images are an image A and two or more images B instead oftwo images A and B, results of detecting the images B are output.

<Second Embodiment>

Next, an image difference detection device according to a secondembodiment will be described. FIG. 3 is a block diagram showing aconfiguration of an image difference detection device 10A according tothe second embodiment. The same parts as those of the image differencedetection device 10 shown in FIG. 1 are denoted by the same referencesigns in FIG. 3 and description thereof will be omitted. The imagedifference detection device 10A shown in FIG. 3 is different from theimage difference detection device 10 shown in FIG. 1 in that a changedetection target type input unit 6 is newly provided. FIG. 4 is aflowchart showing a processing operation of the image differencedetection device 10A shown in FIG. 3. The same parts as those of theprocessing operation shown in FIG. 2 are denoted by the same referencesigns in FIG. 4 and description thereof will be omitted. The processingoperation shown in FIG. 4 is different from the processing operationshown in FIG. 2 in that steps S4 a, S9, and S10 are provided.

In the first embodiment, only a change detection target size is input tothe encoding parameter determination unit 2. In the second embodiment,in addition to the change detection target size, a change detectiontarget type which is a type of change detection target (a cloud, abuilding, a sea, or the like from a satellite image or the like) inputby the change detection target type input unit 6 from an outside isinput to the encoding parameter determination unit 2 (step S9). Then,the encoding parameter determination unit 2 determines a quantizationmatrix or the like to be used at the time of encoding in accordance withthe change detection target type (step S10). In response to this, theencoding unit 3 encodes the image A and the image B with the encodingsize and the quantization matrix specified by the encoding parameterdetermination unit 2 (step S4 a). The added processing operation leadsto high detection accuracy. For example, if a change detection targettype with a remarkable edge is specified, the encoding parameterdetermination unit 2 selects a quantization matrix such that highfrequency components are emphasized.

<Third Embodiment>

Next, an image difference detection device according to a thirdembodiment will be described. FIG. 5 is a block diagram showing aconfiguration of an image difference detection device 10B according tothe third embodiment. The same parts as those of the image differencedetection device 10 shown in FIG. 1 are denoted by the same referencesigns in FIG. 5 and description thereof will be omitted. The imagedifference detection device 10B shown in FIG. 5 is different from theimage difference detection device 10 shown in FIG. 1 in that an encodingresult adjustment unit 7 is newly provided. FIG. 6 is a flowchartshowing a processing operation of the image difference detection device10 shown in FIG. 5. The same parts as those of the processing operationshown in FIG. 2 are denoted by the same reference signs in FIG. 6 anddescription thereof will be omitted. The processing operation shown inFIG. 6 is different from the processing operation shown in FIG. 2 inthat step S11 is provided.

The process of the third embodiment is similar to the process of thefirst embodiment, but the process of the third embodiment is differentfrom the process of the first embodiment in that the encoding resultadjustment unit 7 weights (adjusts) the code amount of each of the LCUsof the images A and B used in the change detection unit 4. Specifically,a process of the encoding result adjustment unit 7 is an added process,only a relevant part will be described.

If the characteristics of the image A and the characteristics of theimage B (a sense of detail, color, and the like) are substantially thesame, for example, when the images A and B are a video of general 30 fpsor the like, the code amounts of the image A and the image B are notsignificantly different. However, if a photographing date and time and aphotographing environment (a condition of sunlight when outdoors, anatmosphere state, or the like) are different, the code amount of theimage A and the code amount of the image B are also significantlydifferent in images captured by photographing the same portion or place.Even if change detection is performed from each LCU in these images,substantially all LCUs are detected to be changed and it is difficult todetect a true change. Therefore, if the code amounts in the images A andB are different, it is necessary to adjust the code amount of each LCU.The image difference detection device 10B according to the presentembodiment adjusts the code amount.

The encoding unit 3 encodes the images A and B (step S4) and theencoding result adjustment unit 7 calculates code amounts r_A and r_Bfor each image. The encoding result adjustment unit 7 uses the codeamounts r_A and r_B to adjust the code amount R_B of the LCU within theimage B as follows (step S11).R_B′=(r_A/r_B)×R_B×K

Here, R_B′ denotes an adjusted code amount used by the change detectionunit 4 in a process in a later part of a flow. Also, K is any givenconstant greater than 0. Also, K may be automatically adjusted inaccordance with the entire image or the encoding information for eachLCU. As in the operation shown in the first embodiment, the changedetection unit 4 performs a change detection process using the codeamount R_A and the adjusted code amount R_B′.

<Fourth Embodiment>

Next, an image difference detection device according to a fourthembodiment will be described. FIG. 7 is a block diagram showing aconfiguration of an image difference detection device 10C according tothe fourth embodiment. The same parts as those of the image differencedetection device 10B shown in FIG. 5 are denoted by the same referencesigns in FIG. 7 and description thereof will be omitted. The imagedifference detection device 10C shown in FIG. 7 is different from theimage difference detection device 10B shown in FIG. 5 in that a changedetection result is output on the basis of an output of an encodingresult adjustment unit 7.

The image difference detection device 10C according to the fourthembodiment outputs the output from the encoding result adjustment unit 7as a change detection result without involving a change detection unit4. For example, the encoding result adjustment unit 7 compares a codeamount of an image A with a code amount of an image B. If the following(11) and (12) are satisfied, characteristics of the image A andcharacteristics of the image B are significantly different and it isdetected that there is a change in all the LCUs, so that the encodingresult adjustment unit 7 determines that there is a change in the entireimage or that the change cannot be detected. The encoding resultadjustment unit 7 outputs a determination result as an output result ofthe image difference detection device 10C without involving the changedetection unit 4.max(r_A/r_B)>r_Th1  (11)min(r_A/r_B)<r_Th2  (12)

Here, r_Th1 is a threshold value that satisfies r_Th1>1 and r_Th2 is athreshold value that satisfies 0<r_Th2<1.

<Fifth Embodiment>

Next, an image difference detection device according to a fifthembodiment will be described. FIG. 8 is a block diagram showing aconfiguration of an image difference detection device 10D according tothe fifth embodiment. The same parts as those of the image differencedetection device 10 shown in FIG. 1 are denoted by the same referencesigns in FIG. 8 and description thereof will be omitted. The imagedifference detection device 10D shown in FIG. 8 is different from theimage difference detection device 10 shown in FIG. 1 in that an imageanalysis unit 8 is newly provided. FIG. 9 is a flowchart showing aprocessing operation of the image difference detection device 10D shownin FIG. 8. Here, a processing operation in which the image differencedetection device 10D detects a changed region (a spatial region with adifference) in the image B with respect to the image A will bedescribed.

The processing operation of the image difference detection device 10Dshown in FIG. 8 will be described. The image analysis unit 8 inputs theimage A and the image B from the image input unit 5, inputs a desiredchange detection target size from the change detection target size inputunit 1, and performs image analysis on each of the image A and the imageB (step S21). The image analysis unit 8 identifies a block size todivide the images on the basis of the change detection object size andcalculates a variance value (activity) of each color component in eachof detected blocks obtained by dividing the image in the identifiedblock size. Here, the activity is taken as an example, but an averagevalue or a maximum value of each color component or the like can also beapplied. Then, the image analysis unit 8 calculates a ratio (or adifference) of an average value of activities between detected blocksspatially corresponding to the image A and the image B, and outputs thecalculated ratio to the encoding parameter determination unit 2.

The encoding parameter determination unit 2 determines the encoding sizeor the like according to the input change detection target size and alsodetermines a pattern such as a quantization value to be applied to theimage A and the image B on the basis of the activity ratio output fromthe image analysis unit 8. If H.264/AVC or HEVC is used in encoding of asubsequent stage, the encoding parameter determination unit 2 maydetermine a pattern of a quantization matrix.

Also, the encoding parameter determination unit 2 may determine thequantization parameter value or the quantization matrix for each colorcomponent on the basis of a result of analyzing each color component.For example, when the activity of each color component of the detectedblock n (n=0, 1, . . . , N) is a_(A)(n) or a_(B)(n), a ratio ar betweenaverage values of activities in the images isar=Σa _(A)(n)/ΣΣa _(B)(n).

Here, the encoding parameter determination unit 2 determinesquantization parameters QP_(A) and QP_(B) to be applied to the image Aand the image B on the basis of a value of the ratio ar (step S22). Apredetermined reference quantization parameter is applied to either oneof the image A and the image B as it is and a quantization parameterconverted using a quantization parameter difference e calculated from aris applied to the other.

For example, if the reference quantization parameter is denoted byQP_(A), the transformed quantization parameter QP_(B) isQP_(B)=QP_(A) −e, where e=f(ar).

The function f is a function of converting the activity ratio into aquantization parameter difference. The function f is a functional formhaving a tendency to increase the quantization parameter difference ewhen the activity ratio ar is large.

Next, the encoding unit 3 encodes the image A and the image B by usingthe quantization value or the like determined by the encoding parameterdetermination unit 2, and outputs a code amount for each encoded blockof the encoding size described above (step S23). Means for encoding anymoving image or still image such as MPEG2 or JPEG as well as theabove-described H.264/AVC or HEVC can be applied to an encoding means.

The change detection unit 4 compares code amounts of encoded blocks andoutputs information indicating whether or not each detected block is achanged region through a comparison with a predetermined threshold valueor the like (step S24). The information output by the change detectionunit 4 may be not only the two determinations of whether or not thedetected block is a changed region, but also more than two determinationresults to which a determination that determination is impossible isadded.

As described above, the image difference detection device 10D accordingto the present embodiment determines a quantization parameter to beapplied when each image is encoded on the basis of a ratio or adifference between activities. Thereby, it is possible to minimize anerroneous determination of change detection due to an influence of aphotographing environment or a photographing date and time.

That is, even in images obtained by photographing the same place, thecode amount output as an encoding result is significantly different dueto the influence of the photographing environment or the photographingdate and time. For example, the overall color tone of the image differsbetween sunny times and cloudy times. Thus, when the code amounts arecompared as they are, an erroneous determination of change detectionoccurs due to the influence of the photographing environment or thephotographing date and time. The image difference detection device 10Daccording to the present embodiment calculates a variance value of eachcolor component within the detected block as an activity and determinesa quantization parameter on the basis of a ratio or a difference betweenactivities. The quantization parameter is a main element for determiningthe code amount. By correcting the quantization parameter on the basisof the ratio or the difference between the activities, the imagedifference detection device 10D can minimize an erroneous determinationof change detection.

<Sixth Embodiment>

Next, an image difference detection device according to a sixthembodiment will be described. FIG. 10 is a block diagram showing aconfiguration of an image difference detection device 10E according tothe sixth embodiment. The same parts as those of the image differencedetection device 10D shown in FIG. 8 are denoted by the same referencesigns in FIG. 10 and description thereof will be omitted. The imagedifference detection device 10E shown in FIG. 10 is different from theimage difference detection device 10D shown in FIG. 8 in that an outputof an image analysis unit 8 is input to a change detection unit 4. FIG.11 is a flowchart showing a processing operation of the image differencedetection device 10E shown in FIG. 10. The image difference detectiondevice 10D according to the fifth embodiment uses image analysisinformation output from the image analysis unit 8 to determine anencoding parameter. The image difference detection device 10E accordingto the sixth embodiment uses image analysis information when a changedregion is detected using encoding information.

In the image difference detection device 10E of the present embodiment,the change detection unit 4 inputs an activity ratio for each ofdetected blocks of the image A and the image B output from the imageanalysis unit 8, and corrects the encoding information of each of theimage A and the image B. Specifically, the change detection unit 4scales the code amount on the basis of information of the activity ratiowith respect to code amount information for each of detected blocks ofthe image A and the image B. The change detection unit 4 performs acomparison with a predetermined threshold value by using the scaled codeamount value, determines whether or not each detected block is a changedregion, and outputs a determination result. Calculation of scaling onthe code amount of the detected block may be performed using only theactivity ratio of the corresponding detected block or may be performedin consideration of the activity ratio of a specified surroundingregion.

For example, it is assumed that the encoding unit 3 encodes the images Aand B and calculates code amounts r_(A) and r_(B) of the images. As inthe image difference detection device 10D of the fifth embodiment, ifthe image analysis unit 8 obtains the activity ratio ar, the changedetection unit 4 uses the activity ratio ar to adjust the code amountR_(B) for each detected block in the image B as follows.R _(B′) =R _(B) ×K, where K=g(ar)

Here, the function g is a function of converting the activity ratio to ascaling coefficient of the code amount. The function g is a functionalform having a tendency to increase K if the activity ratio ar is large.

This processing operation will be described with reference to FIG. 11.First, the image analysis unit 8 performs image analysis on the images Aand B on the basis of information of change detection target sizes ofthe images A and B (step S21). Subsequently, the encoding unit 3 encodesthe image A and the image B with specified encoding parameters (stepS23).

Next, the change detection unit 4 corrects encoding information of theimage A and the image B on the basis of an image analysis result (stepS25). Then, the change detection unit 4 identifies a changed region ofthe image B with respect to the image A on the basis of encodinginformation of the image A and the image B after the correction (stepS24).

As described above, in the present embodiment, the code amount of eachimage is adjusted on the basis of the ratio or the difference betweenthe activities. Thereby, it is possible to minimize an erroneousdetermination of change detection due to the influence of aphotographing environment or a photographing date and time.

That is, even in images captured in the same place, the code amountoutput as an encoding result is significantly different due to theinfluence of the photographing environment or the photographing date andtime. For example, the overall color tone of the image differs betweensunny times and cloudy times. Thus, when the code amounts are comparedas they are, an erroneous determination of change detection occurs dueto the influence of the photographing environment or the photographingdate and time. The image difference detection device 10E according tothe present embodiment calculates a variance value of each colorcomponent in the detected block as an activity and adjusts the codeamount through scaling based on the ratio or the difference between theactivities. Thereby, the image difference detection device 10E canminimize an erroneous determination of change detection due to aninfluence of the photographing environment or the photographing date andtime.

<Seventh Embodiment>

Next, an image difference detection device according to a seventhembodiment will be described. FIG. 12 is a block diagram showing aconfiguration of the image difference detection device 10F according tothe seventh embodiment. The same parts as those of the image differencedetection device 10D shown in FIG. 8 are denoted by the same referencesigns in FIG. 12 and description thereof will be omitted. The imagedifference detection device 10F shown in FIG. 12 is different from theimage difference detection device 10D shown in FIG. 8 in that anencoding change detection target region extraction processing unit 9 isprovided. FIG. 13 is a flowchart showing a processing operation of theimage difference detection device 10 shown in FIG. 12. The imagedifference detection device 10D according to the fifth embodiment usesimage analysis information output from an image analysis unit 8 todetermine encoding parameters. Before a series of processes (a changepoint extraction process) is performed by an encoding parameterdetermination unit 2, an encoding unit 3, and a change detection unit 4,the image difference detection device 10F according to the presentembodiment uses the image analysis information to identify an imageregion serving as a target of the process using the encoding changedetection target region extraction processing unit 9.

The encoding change detection target region extraction processing unit 9inputs an activity ratio of each of detected blocks of the image A andthe image B output from the image analysis unit 8 and sets a detectedblock whose activity ratio is larger than a predetermined thresholdvalue as a non-target block of a change point extraction process basedon encoding of a subsequent stage. As a method of setting a detectedblock as a non-target block, (1) a method of clipping or dividing animage to omit a detected non-target block, (2) a method of painting adetected non-target block in a specified color, (3) a method ofreflecting an encoding parameter to be applied only to a detectednon-target bock and a threshold value for change detection so that aregion is necessarily determined to be a changed region by the changedetection unit of the subsequent stage without changing an image, andthe like can be used.

In the case of (1), a change point extraction process based on encodingis performed for each divided or clipped image. If the detected blocksize is small, a large number of fine images are generated throughclipping or dividing. If there is a certain area or more where a regiondetermined not to be a target is present, a region which is not anon-target region may be also regarded to be a non-target region and itis possible to reduce the number of divisions and the like.

In the case of (2), the change point extraction process based onencoding as in the fifth embodiment is performed.

In the case of (3), the encoding parameter determination unit 2 sets thethreshold value for the code amount difference to 0 or a very smallvalue only in the non-target region.

This processing operation will be described with reference to FIG. 13.First, the image analysis unit 8 performs image analysis on the basis ofinformation of the change detection target size for the images A and B(step S21). Subsequently, the encoding change detection target regionextraction processing unit 9 identifies a region where change detectionbased on subsequent encoding is performed on the basis of an imageanalysis result (step S26).

Next, the encoding unit 3 encodes, for the identified image regions astarget, the image A and the image B with an encoding parameter set foreach region (performs image division or the like as necessary) (stepS27). Then, the change detection unit 4 identifies a changed region ofthe image B with respect to the image A on the basis of calculatedencoding information of the image A and the image B and a regionextraction result based on an image analysis result (step S28).

As described above, the image difference detection device 10F of thepresent embodiment determines a region serving as a target of the changepoint extraction process on the basis of a ratio or a difference betweenactivities. Thereby, the image difference detection device 10F canminimize an erroneous determination of change detection due to theinfluence of the photographing environment or the photographing date andtime.

That is, even in images captured in the same place, the code amountoutput as an encoding result is significantly different due to theinfluence of the photographing environment or the photographing date andtime. For example, the overall color tone of the image differs betweensunny times and cloudy times. Furthermore, when a region is covered withmany clouds, a difference in a code amount becomes large. Therefore, theimage difference detection device 10F according to the presentembodiment determines a region serving as a target of the change pointextraction process on the basis of the ratio or the difference betweenthe activities. Thereby, images whose code amounts significantly changeeven if the same region is photographed such as a cloudy image and acloudless image can be excluded from change detection targets. Thereby,the image difference detection device 10F can minimize an erroneousdetermination of change detection due to the influence of thephotographing environment or the photographing date and time.

<Eighth Embodiment>

Next, an image difference detection device according to an eighthembodiment will be described. FIG. 14 is a block diagram showing aconfiguration of an image difference detection device 10G according tothe eighth embodiment. The same parts as those of the image differencedetection device 10 shown in FIG. 1 are denoted by the same referencesigns in FIG. 14 and description thereof will be omitted. The imagedifference detection device 10G shown in FIG. 14 is different from theimage difference detection device 10 shown in FIG. 1 in that a startingpoint candidate input unit 11 is newly provided. FIG. 15 is a flowchartshowing a processing operation of the image difference detection device10G shown in FIG. 14.

In the image difference detection device 10G according to the presentembodiment, when a changed region is identified, the encoding unit 3encodes an image A and an image B at different starting points andexecutes an encoding process on each image twice or more. A startingpoint candidate is input to the starting point candidate input unit 11.The change detection unit 4 identifies a changed region by combiningresults of a plurality of encoding processes. As in HEVC, H.264, MPEG2,MPEG JPEG or the like as an encoding scheme, one screen is divided intoa plurality of blocks, predictive encoding is performed according tointra- or inter-prediction in units of blocks and orthogonal codes, andan encoding scheme of performing compressed encoding on encoded data ofeach block according to a variable length code is used. The encodingunit 3 performs encoding for at least each block.

As an example, the number of pixels of half a block size serving as aunit of encoding in vertical and horizontal directions can be applied asa shift width for differentiating a starting point. For example, if an8×8 block is assumed to be a unit of encoding, a position (0, 0) becomesa starting point when the starting point is not shifted and a position(4, 4) becomes a starting point when half the block size in the verticaland horizontal directions is shifted. In this case, the starting point(0, 0) and the starting point (4, 4) are input as the starting pointcandidate to the starting point candidate input unit 11. Then, theencoding unit 3 performs encoding in two patterns from the startingpoint (0, 0) and the starting point (4, 4). Then, the change detectionunit 4 identifies a changed region by combining an encoding processingresult when encoding is performed from the starting point (0, 0) and anencoding processing result when encoding is performed from the startingpoint (4, 4).

Next, the processing operation of the image difference detection device10G shown in FIG. 14 will be described with reference to the flowchartof FIG. 15. First, the starting point candidate input unit 11 pre-inputstwo or more candidates for encoding starting points (uppermost leftpixel positions) of the images A and B and sets the two or morecandidate starting points.

The encoding unit 3 encodes the image A and the image B with respect toall the set candidate starting points as starting points (step S101) andsaves encoding information (a code amount or the like) obtained throughencoding in a storage region (step S102). For example, two startingpoint candidates of (0, 0) and (4, 4) are assumed. In the former case,the encoding unit 3 starts encoding from a pixel position at the topleft of the image. In the latter case, the encoding unit 3 startsencoding from a position shifted by 4 pixels vertically and horizontallyin a lower right direction from the pixel position at the top left ofthe image. Thereby, the boundary of the encoded block is shifted by fourpixels at a time. The encoding unit 3 iterates a process on allcandidates for the starting point until the encoding process iscompleted (step S103).

When the encoding unit 3 encodes the image A and the image B with allthe candidates for the starting point in the processing of steps S101 toS103, the change detection unit 4 subsequently determines whether or notthe image has a changed region on the basis of encoding information ofthe starting point candidate of each image (step S104). The changedetection unit 4 iterates a process of determining whether or not thereis a changed region with respect to all pixel positions (step S105).

Finally, when the changed region is detected through the processing ofsteps S104 and S105, the change detection unit 4 outputs a changedregion determination result for the entire image (step S106).

Here, in step S104 in FIG. 15, the change detection unit 4 identifiesencoding information of the encoded block in each starting pointcandidate to which a pixel belongs with respect to each of pixelpositions of the image A and the image B and determines whether or notthere is a change in the pixel according to difference calculation ofthe encoding information or the like. Details of this processing will bedescribed with reference to the flowcharts of FIGS. 16 and 17.

FIG. 16 is a flowchart showing an example of a process of determiningwhether or not a region is a changed region in step S104. Here, aprocess of determining whether or not there is a change in a pixel xwill be described.

First, the change detection unit 4 identifies an encoded block includingthe pixel x among encoded blocks obtained through encoding using astarting point candidate n in the image A and the image B (step S111)and identifies a difference in encoding information possessed by theidentified encoded block (step S112). Here, a code amount R is taken asan example of the encoding information, a code amount of the image A isdenoted by RA(n, x), and a code amount of the image B is denoted byRB(n, x). The change detection unit 4 compares a difference between thecode amount RA(n, x) and the code amount RB(n, x) with a threshold valuerTH to determine whether the code amount difference is larger than orequal to the threshold value rTH (step S113). That is, the changedetection unit 4 compares the code amount difference with the thresholdvalue rTH, and determines whether or not the following conditionalexpression is satisfied for all the candidate starting points (stepS114).|RA(n, x)−RB(n, x)|≥rTH

However, in the example of the process shown in FIG. 16, when the aboveexpression is satisfied for any one of starting point candidates (stepS113: Yes), the change detection unit 4 stops determining the remainingstarting point candidates and outputs a determination result indicatingthat there is a change in a pixel (step S115). If the above expressionis not satisfied for all the starting point candidates (step 113: No),the change detection unit 4 outputs the determination result indicatingthat there is no change in a pixel (step S116).

FIG. 17 is a flowchart showing another example of the process ofdetermining whether or not a region is a changed region in step S104.Here, a process of determining whether or not there is a change in apixel x will be described.

The processing of steps S121 and S122 is the same as the processing ofsteps S111 and S112 shown in FIG. 16. In this example, in step S123, thechange detection unit 4 compares the code amount difference of theidentified encoded block with the threshold value rTH and determineswhether or not the code amount difference is less than the thresholdvalue rTH. That is, the change detection unit 4 compares the code amountdifference with the threshold value rTH and determines whether or notthe following conditional expression is satisfied for all the candidatestarting points.|RA(n, x)−RB(n, x)|<rTH

However, in the example of the process shown in FIG. 17, if the aboveexpression is satisfied for any one of starting point candidates (stepS123: Yes), the change detection unit 4 stops determining the remainingstarting point candidates, and outputs a determination result that thereis no change in a pixel (step S125). If the above equation is notsatisfied for all the candidate starting points (step S123: No), thechange detection unit 4 outputs a determination result indicating thatthere is a change in a pixel (step S126).

<Ninth Embodiment>

Next, an image difference detection device according to a ninthembodiment will be described. FIG. 18 is a block diagram showing aconfiguration of an image difference detection device 10H according tothe ninth embodiment. The same parts as those of the image differencedetection device 10 shown in FIG. 1 are denoted by the same referencesigns in FIG. 18 and description thereof will be omitted. The imagedifference detection device 10H shown in FIG. 18 is different from theimage difference detection device 10 shown in FIG. 1 in that a blockcharacteristic classification unit 12 and a region-specific usedencoding information/threshold value input unit 13 are newly provided.FIG. 19 is a flowchart showing a processing operation of the imagedifference detection device 10H shown in FIG. 18.

The block characteristic classification unit 12 in FIG. 18 classifiesthe characteristics of each encoded block into categories such as a flatregion and a complex region. For example, the change detection unit 4detects a change by using only an absolute value of the code amount inthe flat region and the change is detected by using an absolute value ofthe code amount and a variance value of the code amount in the complexregion. As described above, the block characteristic classification unit12 sets a constraint condition according to the category, and changesencoding information and a determination criterion used for changedetection. Also, at this time, the block characteristic classificationunit 12 changes a threshold value according to a category such as a flatregion or a complex region. Also, in each of the classified categories,a step corresponding to a degree thereof may be set. For example, withrespect to the flat region, a category is set with a larger suffix everytime the degree of flatness increases as in flatness 1, flatness 2, . .. .

Next, the processing operation of the image difference detection device10H shown in FIG. 18 will be described with reference to the flowchartof FIG. 19. First, the encoding unit 3 encodes an image A and an image B(step S201), and stores the encoding information of each image in thestorage region (step S202). As in HEVC, H.264,MPEG2, MPEG JPEG or thelike as an encoding scheme, one screen is divided into a plurality ofencoded blocks, predictive encoding is performed according to intra- orinter-prediction in units of encoded blocks and orthogonal codes, and anencoding scheme of performing compressed encoding on encoded data ofeach encoded block according to a variable length code is used. Theencoding unit 3 performs encoding for at least each encoded block.

Next, by using the encoding information, the block characteristicclassification unit 12 classifies encoded blocks in the image A and theimage B into categories corresponding to the region characteristics.Here, an example of a code amount is taken as the encoding informationand a case in which encoded blocks are classified into two categoriessuch as a flat region and a complex region by using the code amount willbe described.

First, the block characteristic classification unit 12 inputs the codeamount of each encoded block of the image A and performsnon-hierarchical clustering of one-dimensional data. As a clusteringmethod, for example, a k-means method or the like can be mentioned. Theblock characteristic classification unit 12 classifies code amount datagroups into two clusters according to the k-means method or the like andclassifies the code amount data groups into a cluster having a smallcentroid code amount value (a small cluster) and a cluster having alarge centroid code amount value (a large cluster) (step S203). That is,assuming that the code amount of a encoded blocky of the image A isdenoted by RA(y), the centroid code amount of the small clustercalculated in the k-means method is denoted by rA1, and the centroidcode amount of the large cluster is denoted by rA2, the blockcharacteristic classification unit 12 performs clustering as follows.

If (RA(y)≤(rA1+rA2)/2): the encoded block y is the small cluster,

Else: the encoded block y is the large cluster.

The block characteristic classification unit 12 also performs a processsimilar to the above on the image B in a similar manner.

Next, the block characteristic classification unit 12 determines whetherthe encoded block y is classified as either a flat region or a complexregion (step S204). For example, the block characteristic classificationunit 12 confirms cluster types of the image A and the image B andclassifies the encoded blocks y as a flat region and a complex region asdescribed below.

-   -   If ( RA(y)≤(rA1+rA2)/2)        -   && (RB(y)≤(rB1+rB2)/2): the encoded blocky is the flat            region,    -   Else: the encoded block y is the complex region.

Also, as a method of classifying whether the encoded block y is a flatregion or a complex region according to a high or low priority, a methodof determining priorities of the images A and B by using externalinformation (a photographing date and time, image quality, or the like)of the image A or B as a key and determining region characteristics onthe basis of the priorities if a type of cluster is different can beapplied in addition to the above-described method.

The processing of step S204 is iterated until the processing iscompleted on all encoded blocks (step S205).

Subsequently, the change detection unit 4 determines whether or not thecharacteristic of the encoded block is a flat characteristic (stepS206). The change detection unit 4 performs a change determination for aflat characteristic (step S207) if the characteristic of the encodedblock is the flat characteristic (step S206: Yes) and performs a changedetermination for a complex characteristic (step S208) if thecharacteristic of the encoded block is the complex characteristic (StepS206: No).

The processing of steps S206 to S208 is iterated until the processing iscompleted on all encoded blocks (step S209).

Here, the change determination for the flat characteristic in step S207and the change determination for the complex characteristic in step S208can be performed as follows.

(1) When a code amount value and a code amount variance value are usedas an index in the flat region and only a code amount value is used asan index in the complex region

Threshold values for the change determination in the flat region areassumed to be a code amount threshold value r′TH and a code amountvariance threshold value vTH and a threshold value for changedetermination in the complex region is assumed to be a code amountthreshold value r″TH. At this time, if the encoded blocky is a flatregion, the change detection unit 4 determines whether or not there is achange in the encoded block y according to the following determinationexpression.

-   -   If (|RA(y)−RB(y)|≤r′TH)        -   && (VA(y)≤vTH)        -   && (VB(y)≤vTH): there is no change in the encoded block y,    -   Else: there is a change in the encoded block y.

Also, if the encoded block y is a complex region, the change detectionunit 4 determines whether or not there is a change in the encoded blocky according to the following determination expression.

If (|RA(y)−RB(y)|≤r″TH): there is no change in the encoded block y,

Else: there is a change in the encoded block y.

Here, VA(y) and VB(y) denote variance values of code amounts of anencoded block around the encoded blocky of the image A and the image Band the encoded block y. For example, the change detection unit 4calculates a variance value from code amount values of p vertically andhorizontally adjacent encoded blocks ((2p+1)*(2p+1) encoded blocks)around the encoded block y. p is pre-specified from outside.

(2) When only a code amount value is used as an index for both the flatregion and the complex region

The threshold value for the change determination in the flat region isassumed to be the code amount threshold r′TH and the threshold value forthe change determination in the complex region is assumed to be the codeamount threshold value r″TH. At this time, if the encoded blocky is theflat region, the change detection unit 4 determines whether or not thereis a change in the encoded block according to the followingdetermination expression.

If (|RA(y)−RB(y)|≤r′TH): there is no change in the encoded blocky,

Else: there is a change in the encoded block y.

When the encoded block y is the complex region, the change detectionunit 4 determines whether or not there is a change in the encoded blockaccording to the following determination expression.

If (|RA(y)−RB(y)|≤r″TH): there is no change in the encoded block y,

Else: there is a change in the encoded block y.

As an example, if the encoded block is the flat region, the changedetection unit 4 performs a change determination on encoding informationfor the predetermined flat region by using a change determination indexand a threshold value corresponding thereto. Also, if the encoded blockis the complex region, the change detection unit 4 uses one or both ofthe change determination index and the threshold value different fromthat of the flat region.

Finally, when the changed region is detected in the processing of stepsS206 to S209, the change detection unit 4 outputs a changed regiondetermination result of the entire image (step S210).

<Tenth Embodiment22

Next, an image difference detection device according to a tenthembodiment will be described. FIG. 20 is a block diagram showing aconfiguration of an image difference detection device 110 according tothe tenth embodiment. As shown in FIG. 20, the image differencedetection device 110 according to the tenth embodiment includes an imageinput unit 101, an encoding unit 102, a block-specific encodinginformation identification unit 103, a complexity index valuecalculation unit 104, and a change detection unit 105. FIG. 21 is aflowchart showing a processing operation of the image differencedetection device 110 shown in FIG. 20.

In the image difference detection device 110 according to the presentembodiment, the image input unit 101 inputs uncompressed images A and Band the encoding unit 102 performs encoding thereon. The images A and Bare images having different photographing dates and times but are imageshaving the same spatial region in the photographing range. Then, theblock-specific encoding information identification unit 103 identifiesvarious types of encoding information calculated during encoding.

The complexity index value calculation unit 104 calculates a complexityindex value from the encoding information. Then, the change detectionunit 105 identifies a changed region by using the complexity indexvalue.

Next, the processing operation of the image difference detection device110 shown in FIG. 20 will be described with reference to the flowchartof FIG. 21. First, the image input unit 101 inputs the image A and theimage B, and the encoding unit 102 encodes the image A and the image B(step S301). For encoding, HEVC, H.264, JPEG, and the like are used.Next, the block-specific encoding information identification unit 103records various types of encoding information calculated during encodingand saves the recorded encoding information in a memory region as a log.As the encoding information for calculating the complexity index value,the following can be used.

-   -   Code amount in the encoded block (CU, CTU)    -   Binary bit value width (bin) in the encoded block (CU, CTU)    -   DCT coefficient in the encoded block (CU, CTU)

Subsequently, the complexity index value calculation unit 104 calculatesa complexity index value from the encoding information (step S302). Asthe complexity index value, the following encoding information or aweighted sum thereof can be applied as an index value. The index valueobtained by the weighted sum is, for example, a value obtained by addinga squared value or an absolute value of the difference between theparameter of the image A and the parameter of the image B for eachparameter included in the encoding information or a value obtained byweighted-adding a squared value or an absolute value of the differencebetween the parameter of the image A and the parameter of the image Bfor each parameter included in the encoding information.

-   -   Total code amount in the encoded block (CU, CTU)    -   Code amount related to a DCT coefficient in the encoded block        (CU, CTU)    -   Code amount of each of Y/Cb/Cr in the encoded block (CU, CTU)    -   Binary bit value width (bin) in the encoded block (CU, CTU)    -   DCT coefficient value or number of significant coefficients in        the encoded block (CU, CTU)

Next, the change detection unit 105 performs change detection using thiscomplexity index value (step S303). The change detection method issimilar to that of the above-described embodiment.

As described above, the image difference detection devices of the firstembodiment to the ninth embodiment compare code amounts to identify achanged region. On the other hand, the image difference detection deviceof the tenth embodiment compares complexity index values.

<Eleventh Embodiment>

Next, an image difference detection device according to an eleventhembodiment will be described. FIG. 22 is a block diagram showing aconfiguration of an image difference detection device 210 according tothe eleventh embodiment. FIG. 23 is a flowchart showing a processingoperation of the image difference detection device 210 shown in FIG. 22.The image difference detection device 210 shown in FIG. 22 may include acomputer device. The image difference detection device 210 includes anencoded data input unit 201, a variable length code decoding unit 202, ablock-specific encoding information identification unit 203, acomplexity index value calculation unit 204, a common regionidentification unit 205, a complexity index value correction unit 206, achange detection unit 207, a position information metadata input unit208, and a linear sum coefficient input unit 209.

In each of the above-described first to tenth embodiments, uncompressedimages are input as an image A and an image B. On the other hand, in thepresent embodiment, the encoded data input unit 201 inputs encoded dataof the encoded images A and B. The images A and B are images withdifferent photographing dates and times, but are images having the samespatial region in a photographing range. As the encoding scheme, HEVC,H.264, MPEG 2, MPEG JPEG and the like are used. The variable length codedecoding unit 202 decodes variable length codes with respect to theencoded data of the encoded images A and B. The block-specific encodinginformation identification unit 203 identifies various types of encodinginformation calculated during decoding. The complexity index valuecalculation unit 204 calculates a complexity index value for simulatingcomplexity of texture of each encoded block from various types ofencoding information calculated during decoding. That is, the variablelength code decoding unit 202 operates as an acquisition unit configuredto acquire encoding information of each of the encoded blocks bycompleting the decoding of the variable length code. The decoding of thevariable length code is a part of processing performed in the process ofdecoding the image from the encoded data.

The position information metadata input unit 208 inputs global positioninformation serving as external information as metadata. The commonregion identification unit 205 identifies the same subject in the imageA and the image B as a common region. The complexity index valuecorrection unit 206 calculates a complexity index value in the commonregion of the image A and the image B. The complexity index valuecorrection unit 206 has a filter configured to perform linear sumcomputation of calculating the complexity index value in the commonregion. The linear sum coefficient input unit 209 inputs a coefficientof the linear sum computation. The same subject is a region determinedto have the same position between image files where position informationis saved according to position information between image files. That is,the same subject is a region determined to be substantially the samespace. Also, the position information stored in the image file may beseparately acquired. Also, the image file may be a satellite image, anaerial photo, or an image captured by a commercially available digitalcamera, a mobile phone, or the like.

Next, the processing operation of the image difference detection device210 shown in FIG. 22 will be described with reference to the flowchartof FIG. 23.

First, the encoded data input unit 201 inputs encoded data of theencoded image A and encoded data of the image B. The variable lengthcode decoding unit 202 decodes variable length codes with respect to theencoded data (step S401). Next, the block-specific encoding informationidentification unit 203 identifies encoding information held by eachencoded block (step S402), and the complexity index value calculationunit 204 calculates a complexity index value on the basis of theidentified encoding information (step S403).

As the encoding scheme of the encoded data of the input images A and B,HEVC, H.264, JPEG, and the like can be conceived. In these encodingschemes, one screen is divided into a plurality of encoded blocks,predictive encoding is performed according to intra- or inter-predictionin units of encoded blocks and orthogonal codes of a DCT or the like,and an encoding scheme of performing compressed encoding on codes ofeach encoded block according to a variable length code is used. As thevariable length code, a binary arithmetic code is used in HEVC or H.264.In JPEG, a Huffman code is used. Therefore, the above-describedprocessing of steps S401 to S403 specifically becomes processing asfollows in accordance with the encoding scheme.

(1) When encoded data encoded in HEVC or H.264 is input

FIG. 24 is a flowchart showing a processing operation of obtaining acomplexity index value from encoded data encoded in HEVC or H.264.First, the variable length code decoding unit 202 decodes an arithmeticcode (CABAC) to acquire a binary signal (step S501). Then, the variablelength code decoding unit 202 acquires each syntax element and convertsthe binary signal into a multi-value signal (step S502). Next, theblock-specific encoding information identification unit 203 identifiesthe encoding information held by each encoded block (CU, CTU) (stepS503). For example, the following information can be used as encodinginformation.

-   -   Code amount in the encoded block (CU, CTU)    -   Binary value bit width (bin) in the encoded block (CU, CTU)    -   DCT coefficient in the encoded block (CU, CTU)

Subsequently, on the basis of the encoding information, the complexityindex value calculation unit 204 calculates a complexity index valuethat is an index value reflecting the structure of the encoded blockconstituting the subject (step S504). As the complexity index value, forexample, the following values, a weighted sum thereof, or the like canbe applied. The index value obtained by the weighted sum is, forexample, a value obtained by adding a squared value or an absolute valueof the difference between the parameter of the image A and the parameterof the image B for each parameter included in the encoding informationor a value obtained by weighted-adding a squared value or an absolutevalue of the difference between the parameter of the image A and theparameter of the image B for each parameter included in the encodinginformation.

-   -   Total code amount in the encoded block (CU, CTU)    -   Code amount related to a DCT coefficient in the encoded block        (CU, CTU)    -   Code amount of each of Y/Cb/Cr in the encoded block (CU, CTU)    -   Binary bit value width (bin) in the encoded block (CU, CTU)    -   DCT coefficient value or number of significant coefficients in        the encoded block (CU, CTU)

(2) When encoded data encoded in JPEG is input

FIG. 25 is a flowchart showing a processing operation of obtaining acomplexity index value from encoded data encoded in JPEG First, thevariable length code decoding unit 202 decodes a Huffman code andoutputs a multi-value signal (step S601). Next, the block-specificencoding information identification unit 203 identifies a data boundaryof each encoded block (8×8) (step S602). Subsequently, the complexityindex value calculation unit 204 outputs a DCT coefficient value, thenumber of significant coefficients, or the like retained by each encodedblock as a complexity index (step S603).

In the processing shown in FIG. 23, when the complexity index value iscalculated in steps S401 to S403, the common region identification unit205 inputs position information metadata from the position informationmetadata input unit 208, identifies a positionally corresponding pixelposition between images by using the position information metadata, andderives a common region between images (step S404). As the positioninformation metadata, geographical position information in whichcoordinates in the image is indicated by latitude and longitude, a UTMcoordinate system, or the like is used if a target image is a satelliteimage or the like.

Subsequently, the complexity index value correction unit 206 identifiesan encoded block including a corresponding pixel position in each imageand corrects a complexity index value by a position difference(deviation) between encoded blocks (step S405).

FIG. 26 is a flowchart showing a process of correcting the complexityindex value in the common region in step S405 shown in FIG. 23. Also,FIG. 27 is a diagram showing an example of the process of correcting thecomplexity index value in the common region.

First, the complexity index value correction unit 206 inputs acomplexity index value indicating the complexity of texture in each ofencoded blocks of an image A and an image B (step S701). As shown inFIG. 27, when an encoded block of the image A is denoted by G_(A) (s),its complexity index value is denoted by C_(A) (G_(A)(s)). Here, sdenotes a number when the permutation of an encoded block is determinedin a raster scan order from the upper left of the image. Likewise, thecomplexity index value of the image B is defined by C_(B) (G_(B)(s)).

Next, the complexity index value correction unit 206 identifies a commonregion (a geographically overlapping region) between the imagesidentified by the external information (step S702). The common region isshown as a pixel region (range). The common region between the image Aand the image B is assumed to be k1≤x≤k2 and l1≤y≤l2 in the image A andis assumed to be m1≤x≤m2 and n1≤y≤n2 in the image B. Here, (x, y) is avalue indicating a pixel position.

Subsequently, the complexity index value correction unit 206 identifiesa position difference (the difference number of pixels) between anencoded block position when only the common region is assumed to beencoded as an image and an encoded block position actually encoded onencoded data of each of the image A and the image B (step S703). Here,as shown in FIG. 27, the difference number of pixels of an encoded blockposition of the image A is denoted by (P_(A), Q_(A)).

Finally, the complexity index value correction unit 206 calculates acomplexity index value at each encoded block position of the commonregion according to filtering computation and corrects the complexityindex value (step S704). When the complexity index value of an encodedblock t in the common region of the image A after the correction isdenoted by C_(A′)(t), C_(A′)(t) is described as follows.C _(A′)(t)=Σα(s, P _(A) , Q _(A))*C _(A)(G _(A)(s))

Here, α is a coefficient corresponding to the difference number ofpixels. That is, in this example, the corrected complexity index valueis calculated as a linear sum of the original complexity index valuegroup. The complexity index value correction unit 206 also calculatesthe corrected complexity index value for the image B in a similarprocedure. Also, a linear sum coefficient a is determined so that 0≤α(s,P_(A), Q_(A))≤1 is changed in accordance with a pixel position and isgiven from outside so that Σα=1. An encoded block serving as a target offilter computation is, for example, an encoded block that is a regionoverlapping the encoded block t among encoded blocks in the encodeddata.

A coefficient of linear computation when complexity index values of theimage A and the image B are corrected on the basis of a positiondifference is input as a coefficient corresponding to theabove-described position difference to the linear sum coefficient inputunit 209 and is set as a coefficient for correcting displacement due tothe encoded block. Also, when a plurality of coefficients for performinglinear computation are pre-stored, the complexity index value correctionunit 206 may select a coefficient corresponding to the positiondifference from among the stored coefficients. Also, nonlinearcomputation may be used for filter computation for C_(A)′ from thecomplexity index value C_(A). Filter coefficients may be pre-stored inthe image difference detection device 210. In this case, the complexityindex value correction unit 206 may perform filter computation usingthis filter coefficient. At this time, different filter computation (forexample, nonlinear computation) may be used.

As shown in FIG. 27, the complexity index value C_(A)′ (t) of theencoded block t in the common region is obtained by performing linearcomputation on the basis of the difference number of pixels (P_(A),Q_(A)) with respect to the complexity index value C_(A)(G_(A)(s)) of theencoded block G_(A)(s) of the image A. Likewise, the complexity indexvalue C_(B)′ (t) of the encoded block tin the common region is obtainedby performing linear computation on the basis of the difference numberof pixels (P_(B), Q_(B)) with respect to the complexity index valueC_(B)(G_(B)(s)) of the encoded block G_(B)(s) of the image B.

In FIG. 23, when the complexity index values of the image A and theimage B are corrected in step S405, the change detection unit 207identifies the same common region between the image A and the image B byusing the corrected complexity index values and detects a change in thecommon region (step S406). A process of detecting a change by using thecorrected complexity index value is similar to those of the otherembodiments.

Also, although a case in which a change is detected between two or moreimages with different photographing dates and times has been describedin each embodiment, the image difference detection device according toeach embodiment is not limited to a photographing place or date and timeand can be applied to a field of application for detecting a differencebetween two or more images.

As described above, by comparing images of the same spatial region withdifferent photographing dates and times in satellite images, aerialimages, medical images, or the like, it is possible to quickly detect achanged region (a position where there is a difference).

The image difference detection device according to the eleventhembodiment does not complete the decoding of the encoded data when animage change is detected from the encoded images A and B and obtains acomplexity index value from encoding information obtained duringdecoding to detect a changed region. That is, a general image encodingscheme includes the step of dividing one screen into a plurality ofencoded blocks and performing predictive encoding according to intra- orinter-prediction in units of encoded blocks and orthogonal codes and thestep of performing compressed encoding on encoded data for each encodedblock according to variable length codes. Therefore, the step ofdecoding variable length codes and the step of decoding orthogonal codesare necessary to decode an image and an amount of computation isincreased. The image difference detection device according to theeleventh embodiment detects a changed region by obtaining a complexityindex value from the encoding information obtained in the step ofdecoding only the variable length codes. Thus, the amount of computationat when a difference between images given as encoded data is detected issignificantly reduced and a high-speed operation is possible.

In each embodiment, in place of the detection of the difference based onthe encoded block, the difference based on the detected block may bedetected. If the size of the detected block is the same as the size ofthe encoded block, the image difference detection device performs thesame process. If the size of the detected block is different from thesize of the encoded block, the image difference detection devicecalculates a detected block code amount or index value on the basis ofan encoding amount or an index value of the encoded block. For example,if the size of the encoded block is smaller than the size of thedetected block, the image difference detection device adds the codeamount or the index value of each of the encoded blocks included in thedetected block, so that the code amount or the index value of thedetected block is calculated. If the size of the encoded block is largerthan the size of the detected block, the image difference detectiondevice multiplies the code amount or the index value of the encodedblock including the detected block by a ratio of an area of the detectedblock to an area of the encoded block, and a value obtained through themultiplication is set as the code amount or the index value of thedetected block. That is, if the size of the encoded block is differentfrom the size of the detected block, the image difference detectiondevice performs linear computation according to the difference or theratio between the sizes of the encoded block and the detected block onthe code amount or the index value of the encoded block to obtain thecode amount or the index value of the detected block. A process ofcalculating the code amount or the index value of the encoded block inaccordance with a size difference is performed by the change detectionunit, the block characteristic classification unit, or the complexityindex value calculation unit.

For example, the addition of the index value when the DCT coefficient isused as the index value indicates computation of extracting apredetermined number of DCT coefficients on the high frequency side foreach encoded block and calculating a sum of the extracted DCTcoefficients. In place of the DCT coefficient on the high frequencyside, the DCT coefficient on the low frequency side may be used. Also, afrequency component that noticeably indicates the presence or absence ofa difference may be extracted from the DCT coefficient or weightedaddition in which a weight for the DCT coefficient is made larger thanthose of the other DCT coefficients may be performed instead of the sumcalculation. Also, if the DCT coefficient is used as the index value,the presence or absence of the difference may be detected on the basisof the number of DCT coefficients whose absolute values exceed apredetermined threshold value. That is, the presence or absence of thedifference may be determined according to the number of significant DCTcoefficients having power exceeding the threshold value.

Also, as the encoding scheme used in each embodiment, for example, it isalso possible to use AVC, MPEG MPEG-2, JPEG or the like in addition toHEVC. Furthermore, it is also possible to detect a difference for eachregion divided in a size larger or smaller than that of the macroblockor the encoding size and a similar effect is obtained. Also, it ispossible to use an average value/maximum value of activities of eachregion, a DC coefficient obtained by a DCT and information obtained byan encoding result such as each encoding mode instead of the code amountas the encoding information and a similar effect is obtained.

Also, although an example in which a change is detected between two ormore images with different photographing dates and times has beendescribed above, the image difference detection device according to eachof the above-described embodiments is not limited to a photographingplace or date and time and can be applied to a field of application fordetecting a difference between two or more images.

Also, although the configuration of the image difference detectiondevice that identifies a small region having a difference by using anencoding scheme in which a region is divided into rectangular smallregions (encoded blocks) has been described, the identification of theregion is not indispensable and the image difference detection devicemay simply detect that there is a difference between two imagesaccording to a difference in a code amount.

Also, the image difference detection device according to each embodimentdetermines a change by comparing code amounts. Because the entire amountof information is significantly changed if a sense of detail isdifferent between images even when the images to be compared arecaptured from the same point, a “process of approximating the total codeamount” is performed as a premise.

Also, the image difference detection device according to each embodimentcan be used irrespective of an encoding standard. The effect isprominent when the encoding scheme is a “variable bit rate.”

Also, the image difference detection device according to each of theabove-described embodiments can be used together with othertechnologies.

Also, a change determination in each of the above-described embodimentscan be used with the ordinary encoding as a set as well as for a changedetermination. Therefore, the above-described image difference detectiondevice may achieve other objectives.

As described above, by comparing images of the same spatial region withdifferent photographing dates and times in satellite images, aerialimages, medical images, or the like, it is possible to quickly detect achanged region (a position where there is a difference).

Compared with the conventional technology for detecting a change betweenimages, the image difference detection device of each embodiment usingthe code amount as an index can detect a difference at a high speed andreduce an amount of computation required for detection. When the imagedifference detection devices according to the conventional technologyand each embodiment are compared in an environment similar to that ofthe conventional technology, a time required until a result is output isconsequently greatly shortened.

The image difference detection device in the above-described embodimentmay be implemented by a computer. In this case, functions thereof may beimplemented by recording a program for implementing the functions on acomputer-readable recording medium and causing a computer system to readand execute the program recorded on the recording medium. Also, the“computer system” described here is assumed to include an operatingsystem (OS) and hardware such as peripheral devices. Also, the“computer-readable recording medium” refers to a storage deviceincluding a flexible disk, a magneto-optical disc, a read only memory(ROM), a portable medium such as a compact disc (CD)-ROM, and a harddisk embedded in the computer system. Further, the “computer-readablerecording medium” is assumed to include a computer-readable recordingmedium for dynamically retaining a program for a short time as in acommunication line when the program is transmitted via a network such asthe Internet or a communication circuit such as a telephone circuit anda computer-readable recording medium for retaining the program for apredetermined time as in a volatile memory inside the computer systemincluding a server and a client when the program is transmitted. Also,the above-described program may be used to implement some of theabove-described functions. Further, the program may implement theabove-described functions in combination with a program already recordedon the computer system or may be implemented using a programmable logicdevice such as a field programmable gate array (FPGA).

Although embodiments of the present invention have been described abovewith reference to the drawings, specific configurations are not limitedto the embodiments, and design changes and the like may also be includedwithout departing from the scope of the present invention. For example,an embodiment may be implemented by combining configurations of aplurality of embodiments.

INDUSTRIAL APPLICABILITY

The present invention can also be applied to a field of application fordetecting a difference between two or more images at a higher speed.

REFERENCE SIGNS LIST

10A, 10B, 10C, 10D, 10E, 10F, 10G, 10H, 110, 201 Image differencedetection device

1 Change detection target size input unit

2 Encoding parameter determination unit

3, 102 Encoding unit

4,105,207 Change detection unit

5,101 Image input unit

6 Change detection target type input unit

7 Encoding result adjustment unit

8 Image analysis unit

9 Encoding change detection target region extraction processing unit

11 Starting point candidate input unit

12 Block characteristic classification unit

13 Region-specific used encoding information/threshold value input unit

103 Block-specific encoding information identification unit

104, 204 Complexity index value calculation unit

201 Encoded data input unit

202 Variable length code decoding unit

203 Block-specific encoding information identification unit

205 Common region identification unit

206 Complexity index value correction unit

208 Position information metadata input unit

209 Linear sum coefficient input unit

The invention claimed is:
 1. An image difference detection devicecomprising: a detection unit configured to detect presence or absence ofa difference between a first region within a first image and a secondregion corresponding to the first region within a second image on abasis of one or both of a code amount of each of encoded blocks in firstand second encoded data obtained by encoding the first image and thesecond image and an index value obtained from encoding information ofeach of the encoded blocks.
 2. The image difference detection deviceaccording to claim 1, wherein a variable length code is used in encodingused when the first and second encoded data is obtained.
 3. The imagedifference detection device according to claim 1 further comprising: anencoding information acquisition unit configured to acquire the encodinginformation of each of the encoded blocks from the first and secondencoded data, wherein the detection unit is further configured todetermine the presence or absence of the difference between the firstregion and the second region on a basis of the index value obtained fromthe encoding information acquired by the encoding informationacquisition unit.
 4. The image difference detection device according toclaim 1 further comprising: an input unit configured to inputinformation for identifying each of the first and second regions betweenwhich the presence or absence of the difference is detected in the firstand second images; and a region identification unit configured toidentify each of the encoded blocks corresponding to the first andsecond regions identified on a basis of the information input by theinput unit, wherein the detection unit is further configured to detectthe presence or absence of the difference between the first and secondregions identified on a basis of one or both of the code amount of theencoded block identified by the region identification unit and the indexvalue obtained from the encoding information.
 5. The image differencedetection device according to claim 4, wherein the input unit is furtherconfigured to input position information indicating a position wherethere is a subject serving as a detection target of the difference inthe first and second images as information for identifying the first andsecond regions.
 6. The image difference detection device according toclaim 1, further comprising: a classification unit configured toclassify the encoded blocks into a plurality of categories on a basis ofthe encoding information obtained when a plurality of encoded blocksobtained by dividing each of the first and second images are encoded,wherein the detection unit is further configured to determine athreshold value for use in a determination of the presence or absence ofthe difference between the first region and the second region on a basisof a classification result of the classification unit, and wherein thedetection unit is further configured to determine the presence orabsence of the difference between the first region and the second regionon a basis of one or both of the code amount and the index value and thedetermined threshold value.
 7. The image difference detection deviceaccording to claim 1, further comprising: a classification unitconfigured to classify the encoded blocks into a plurality of categorieson a basis of the encoding information obtained when a plurality ofencoded blocks obtained by dividing each of the first and second imagesare encoded, wherein the detection unit is further configured todetermine a determination condition for use in a determination of thepresence or absence of the difference between the first region and thesecond region on a basis of a classification result of theclassification unit, and wherein the detection unit is furtherconfigured to determine the presence or absence of the differencebetween the first region and the second region on a basis of one or bothof the code amount and the index value and the determined determinationcondition.
 8. The image difference detection device according to claim6, wherein the classification unit is further configured to classify theencoded blocks into the plurality of categories on a basis of a degreeof complexity of an image obtained from the encoding information.
 9. Theimage difference detection device according to claim 6, wherein theplurality of categories include a flat region and a complex region, andwherein the classification unit is further configured to classify eachof the encoded blocks as the flat region or the complex region on abasis of the degree of complexity of an image obtained from the encodinginformation.
 10. The image difference detection device according toclaim 1, further comprising: a type input unit configured to input typeinformation indicating a characteristic of the difference detectedbetween the first and second images; a parameter determination unitconfigured to determine a quantization matrix on a basis of the typeinformation; and an encoding unit configured to divide each of the firstand second images into a plurality of encoded blocks, and encode each ofthe plurality of encoded blocks on a basis of the quantization matrix togenerate the first and second encoded data.
 11. The image differencedetection device according to claim 1, further comprising: a startingpoint input unit configured to input a plurality of starting points atwhich encoding starts in the first and second images; and an encodingunit configured to divide each of the first and second images into aplurality of encoded blocks on a basis of the starting points and encodethe encoded blocks to generate the first and second encoded data foreach starting point, wherein the detection unit is further configured todetermine the presence or absence of the difference between the firstregion and the second region on a basis of the index value obtained fromthe encoding information calculated for each encoded block in a processof encoding each of the first and second images.
 12. The imagedifference detection device according to claim 1, further comprising: acorrection unit configured to correct the index value on a basis of adifference between a position of the encoded block in the first imageand a position of the encoded block in the second image when the firstand second images are encoded, wherein the detection unit is furtherconfigured to determine the presence or absence of the differencebetween the first region and the second region on a basis of the indexvalue corrected by the correction unit.
 13. The image differencedetection device according to claim 12, wherein the correction unit isfurther configured to select at least one coefficient from a pluralityof predetermined coefficients on a basis of the difference and correctthe index value by using the selected coefficient.
 14. The imagedifference detection device according to claim 1, further comprising: anadjustment unit configured to adjust a code amount of each of theencoded blocks in the first encoded data or the second encoded data on abasis of a ratio between total code amounts of the first and secondencoded data, wherein the detection unit is further configured todetermine the presence or absence of the difference between the firstregion and the second region on a basis of the code amount adjusted bythe adjustment unit.
 15. The image difference detection device accordingto claim 14, wherein the adjustment unit is further configured todetermine that the first image and the second image are entirelydifferent images or that detection of the difference therebetween isimpossible if the ratio between the total code amounts of the first andsecond encoded data exceeds a predetermined value.
 16. An imagedifference detection method comprising: a detection step of detectingpresence or absence of a difference between a first region within afirst image and a second region corresponding to the first region withina second image on a basis of one or both of a code amount of each ofencoded blocks in first and second encoded data obtained by encoding thefirst image and the second image and an index value obtained fromencoding information of each of the encoded blocks.
 17. A non-transitorycomputer-readable medium storing a computer program, the computerprogram configured to cause a computer to function as: a detection unitconfigured to detect presence or absence of a difference between a firstregion within a first image and a second region corresponding to thefirst region within a second image on the basis of one or both of a codeamount of each of encoded blocks in first and second encoded dataobtained by encoding the first image and the second image and an indexvalue obtained from encoding information of each of the encoded blocks.